package com.yuexin.project.store.stock.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yuexin.project.store.stock.domain.Stock;
import com.yuexin.project.store.stock.mapper.StockMapper;

/**
 * 库存管理 服务层实现
 * 
 * @author yuexin
 * @date 2018-11-30
 */
@Service
public class StockServiceImpl implements IStockService 
{
	@Autowired
	private StockMapper stockMapper;

	/**
     * 查询库存管理信息
     * 
     * @param goodsId 库存管理ID
     * @return 库存管理信息
     */
    @Override
	public Stock selectStockById(Integer goodsId)
	{
	    return stockMapper.selectStockById(goodsId);
	}
	
	/**
     * 查询库存管理列表
     * 
     * @param goodsList 库存管理信息
     * @return 库存管理集合
     */
	@Override
	public List<Stock> selectStockList(Stock goodsList)
	{
	    return stockMapper.selectStockList(goodsList);
	}
	
	/**
     * 修改库存管理
     * 
     * @param goodsList 库存管理信息
     * @return 结果
     */
	@Override
	public int updateStock(Stock goodsList)
	{
	    return stockMapper.updateStock(goodsList);
	}

}
